c 
c Copyright (C) 1993, Silicon Graphics, Inc.
c All Rights Reserved.
c
	subroutine mpy_mips1(a,lda,b,ldb,c,ldc,m,n,p,alpha)
c
	implicit double precision(a-h,o-z)
	real*8 alpha,beta
	dimension a(lda,p),b(ldb,n),c(ldc,n)
	integer p
c
	do  100 j=1,(n-1),2
		do 50 i=1,(m-3),4
			t00 = c(i,j)
			t10 = c(i+1,j)
			t20 = c(i+2,j)
			t30 = c(i+3,j)
			t01 = c(i,j+1)
			t11 = c(i+1,j+1)
			t21 = c(i+2,j+1)
			t31 = c(i+3,j+1)
			do 30 k=1,p
			t00    = t00    + a(i,k)*b(k,j)
			t01    = t01    + a(i,k)*b(k,j+1)
			t10    = t10    + a(i+1,k)*b(k,j)
			t11    = t11    + a(i+1,k)*b(k,j+1)
			t20    = t20    + a(i+2,k)*b(k,j)
			t21    = t21    + a(i+2,k)*b(k,j+1)
			t30    = t30    + a(i+3,k)*b(k,j)
			t31    = t31    + a(i+3,k)*b(k,j+1)
 30	continue
                        c(i,j) = t00
                        c(i,j+1) = t01
                        c(i+1,j) = t10
                        c(i+1,j+1) = t11
                        c(i+2,j) = t20
                        c(i+2,j+1) = t21
                        c(i+3,j) = t30
                        c(i+3,j+1) = t31
 50	continue
		do 80 i=i,m
		t00 = c(i,j)
		t01 = c(i,j+1)
		do k =1,p
			t00    = t00    + a(i,k)*b(k,j)
			t01    = t01    + a(i,k)*b(k,j+1)
		enddo
		c(i,j) = t00
		c(i,j) = t01
 80 	continue
	
 100     continue

        do j=j,n
                do k=1,p
                        t00 = b(k,j)
                        do i=1,m
                                c(i,j) = c(i,j) + a(i,k)*t00
                        enddo
                enddo
        enddo


	return
	end
